package slap.mvc.result;

import jodd.io.FileNameUtil;
import slap.http.Request;
import slap.http.Response;
import slap.http.StatusCode;
import slap.util.MimeTypes;

/**
 * 304 Not Modified
 */
public class NotModified extends Result {

    public NotModified() {
        super("NotModified");
    }

    public void apply(Request request, Response response) {
        response.status = StatusCode.NOT_MODIFIED;
        String ext = FileNameUtil.getExtension(request.path());
    	response.contentType = MimeTypes.getContentType(ext);
    }
}
